package com.lagou.service.impl;

import com.lagou.dao.EmployeeDao;
import com.lagou.domain.Employee;
import com.lagou.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/*
* 员工service实现类
*
* */
@Service
@Transactional
public class EmployeeServiceImpl implements EmployeeService {

    @Autowired
    private EmployeeDao employeeDao;

    /*查询所有员工信息*/
    @Override
    public List<Employee> findAll() {
        return employeeDao.findAll ();
    }

    /*新增员工*/
    @Override
    public int saveEmployee(Employee employee) {
        return employeeDao.saveEmployee (employee);
    }
}
